﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Transformer.iHunter
{
    class ViewerProviderWrapper : PluginWrapper, IViewerProvider
    {
        IViewerProvider viewerProvider;

        public ViewerProviderWrapper(IViewerProvider viewerProvider)
            :base(viewerProvider)
        {
            this.viewerProvider = viewerProvider;
        }



        #region IViewerProvider Members

        public IMessageViewer CreateViewerInstance()
        {
            try
            {
                return viewerProvider.CreateViewerInstance();
            }
            catch (Exception e)
            {
                this.OnPluginError(e);
                return null;
            }
        }

        #endregion
    }
}
